<%@ page language="java" import="java.util.*,com.king.cms.common.*" pageEncoding="utf-8"%>
<%@ include file="/hotel/include/css.jsp"%><%-- /*包含css样式表*/ --%>
<%@ include file="date.jsp"%><%-- /*包含css样式表*/ --%>
  
 
<%
 	String action = (String)request.getAttribute("action");
    Map map = (Map)request.getAttribute("dataMap");
    if(null == map)
       map = new HashMap();
    String templateStr = (String)request.getAttribute("template");
    String[] clientStr = (String[])request.getAttribute("clientStr");
    String type = (String)request.getAttribute("type");
    String userStr = (String)request.getAttribute("userStr");
    int pow=(PowerParameter.save | PowerParameter.cls | PowerParameter.list);
    
    
%>
<html>
<head>
<title> </title>
<script language="JavaScript" src="<%=path%>/js/generalcheck.js"></script> 
<script language="javascript">
 function changetype(){
     form1.action="<%=path%>/pubinfo.do?action=add&type="+form1.hytzTag.value;
     form1.submit();
 }
  function gotopage(){ 
     
      if(checkData()){
      	 form1.action="<%=path%>/preview.do?type=<%=type%>";
      	 form1.submit();
       }
 }
 function saveData(){ 
     
      if(checkData()){
      	 form1.action="<%=path%>/pubinfo.do?action=save&type=<%=type%>";
      	 form1.submit();
       }
 }
 function checkData(){ 
      if(!validateNotNull(document.getElementById("hymc"),'会议名称'))
	     return false;
     if(!validateNotNull(document.getElementById("template"),'发布模版')){
    	return false;
    	}
     if(!validateNotNull(document.getElementById("hytzZbdwz"),'主办单位中文名称'))
    	return false;
     if(!validateNotNull(document.getElementById("hytzZbdwe"),'主办单位英文名称'))
    	return false;
    // if(validateNotNull(document.getElementById("hytzHymcz"),'大屏幕第一行内容'))
    //	return false;
    // if(validateNotNull(document.getElementById("hytzHymce"),'大屏幕第二行内容'))
    //	return false;
    if(!validateNotNull(document.getElementById("hytzPort"),'会议地点'))
     	return false;
     if(!validateNotNull(document.getElementById("hytzScwjlj"),'会议logo'))
    	return false;
     if(!validateNotNull(document.getElementById("hytzLine1"),'小屏幕第一行内容'))
       return false;
    if(!validateNotNull(document.getElementById("hytzLine2"),'小屏幕第二行内容'))
    	return false;
    if(!validateNotNull(document.getElementById("hytzLine3"),'小屏幕第三行内容'))
    	return false;
    if(!validateNotNull(document.getElementById("hytzLine4"),'小屏幕第四行内容'))
    	return false;
    if(!validateNotNull(document.getElementById("hytzKssj"),'会议开始时间'))
    	return false;
    if(!validateNotNull(document.getElementById("hytzJssj"),'会议结束时间'))
    	return false;
    if(!validateNotNull(document.getElementById("publishId"),'发布人'))
    	return false;
    if(!validateNotNull(document.getElementById("hytzFbsj"),'发布时间'))
    	return false;
     if(document.getElementById("hytzKssj").value >= document.getElementById("hytzJssj").value){
       alert("会议结束时间不能早于或等于开始时间");
       return false;
    } 
   
    return true;
 }
 function ki_save(){ 
	 saveData();
	}
	function ki_cls(){
		//document.getElementById("hymc").value='';
	}
	function ki_list(){
		window.open('<%=basePath%>info.do?action=list','_self');
	}
	
 function selectRoom(){
 
   openwindow('<%=path%>/client.do?action=select&type=<%=type%>&meetingId=<%=map.get("ID")%>','500','300','_blank');
 }
  
 
</script> 
<style type="text/css">
<!--
.STYLE2 {color: #FF0000}
-->
</style>
</head>

<body background="<%=imgpath%>top3.gif" leftmargin="0" topmargin="0">
<br>
<form name="form1"  enctype="multipart/form-data" action=""   method="post"> 

	<center>	   
	<table  border="0" cellpadding="2" cellspacing="1" class="bg_table" style="width:80%" bordercolor="#111111">
	   <tr class="top_td"> 
		<td colspan="4"></td>
	   </tr>
	   <tr class="td2" >
    <td>会议名称</td>
    <td colspan="3" ><input type="hidden" name="meetingId"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("ID")+"") %>" ><input type="text" name="hymc"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("MEETING_NAME")+"") %>" >
       
       </td>
    </tr>
  <tr class="td2">
    <td width="25%">选择发布类型</td>
    <td width="30%">
    <%if(null == map.get("MEETING_PUBLISH_TYPE")){ %>
      <!-- <select name="hytzTag" <%if("add".equals(action)){%>onChange="changetype(this)"<%}else{%> readonly <%} %> style="width:90%" >
	  <option value="0"  <%if(type.equals(Constants.INFO_TEMPLATE)){out.println(" selected");} %> >发布会议信息</option>
	  <option value="1"  <%if(type.equals(Constants.INFO_PPT)){out.println(" selected");} %>>上传PPS文件</option>
	  <option value="2"  <%if(type.equals(Constants.INFO_VIDEO)){out.println(" selected");} %>>上传媒体文件</option>
      </select>-->
      <%}else{ 
       type = map.get("MEETING_PUBLISH_TYPE")+"";
       StringUtil.returnInfoName(type);
       %>
      <!-- <select name="hytzTag" <%if("add".equals(action)){%>onChange="changetype(this)"<%}else{%> readonly <%} %> style="width:90%" >
	  <option value="0"  <%if(type.equals(Constants.INFO_TEMPLATE)){out.println(" selected");} %> >发布会议信息</option>
	  <option value="1"  <%if(type.equals(Constants.INFO_PPT)){out.println(" selected");} %>>上传PPS文件</option>
	  <option value="2"  <%if(type.equals(Constants.INFO_VIDEO)){out.println(" selected");} %>>上传媒体文件</option>
      </select>-->
      <%} %>
      	</td>
    <td width="20%"><!-- 选择发布模版--></td>
    <td width="30%"><!-- <%=templateStr %>--></td>
  </tr>

  <tr class="td2"   >
    <td width="20%">主办单位(中文)</td>
    <td width="30%"><label>
      <input type="text" name="hytzZbdwz" class="area100" check="c_y_200" style="width:90%" value="<%=StringUtil.NULL2Blank(map.get("MEETING_UNIT_CN")+"") %>"  >
    </label></td>
    <td width="20%">主办单位(英文)</td>
    <td width="30%"><label>
      <input type="text" name="hytzZbdwe"  class="area100" check="c_y_200" style="width:90%" value="<%=StringUtil.NULL2Blank(map.get("MEETING_UNIT_EN")+"") %>" >
    </label></td>
  </tr>

  <!--  <tr class="td2" id="meet"  >
    <td>大屏第一行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3" ><input type="text" name="hytzHymcz"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("BIGSCREEN_LINE_ONE")+"") %>" ></td>
    </tr>
  <tr class="td2" id="meet1"  >
    <td>大屏第二行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3" ><input type="text" name="hytzHymce"  class="area100" check="c_y_200" maxlength="30" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("BIGSCREEN_LINE_TWO")+"") %>" ></td>
    </tr>-->
     <tr class="td2" id="meet1"  >
     <td>选择会议地点 </td>
    <td colspan="3" >
    <input type="hidden" name="hytzPort"  class="area100"     style="width:88%" value="<%=StringUtil.NULL2Blank(clientStr==null?"":clientStr[0]) %>" >
    <input type="text" name="hytzPortName"     style="width:88%" value="<%=StringUtil.NULL2Blank(clientStr==null?"":clientStr[1]) %>" readonly>
    <input type="button" name="choiceupload" class="area100" value="选择"   onClick="selectRoom()"></td>
    </tr>
   
 <!-- <tr class="td2"  id="east" style="display:''">
    <td>东侧屏幕组合</td>
    <td><label>
      <input type="checkbox" name="hytzPort4"  value = "1"  >
      同时显示
    </label></td>
    <td></td>
    <td></td>
  </tr>
  <tr class="td2"  id="west" style="display:''">
    <td>西侧屏幕组合</td>
    <td><label>
      <input type="checkbox" name="hytzPort5"  value = "1"   >
      同时显示
    </label></td>
    <td></td>
    <td></td>
  </tr> -->
  <tr class="td2">
    <td  >选择上传LOGO</td>
    
    <td colspan="3"><input type="file" name="hytzScwjlj"  class="area100"   style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("UPLOAD_FILE_ID")+"") %>"  ContentEditable="false">
    <input type="hidden" name="hytzScwjljId"  class="area100"   style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("UPLOAD_FILE_ID")+"") %>" ></td>
     <!-- <td><label>
      <input type="button" name="choiceupload" class="area100" value="选择"   onClick="uploadfile('hytzScwjlj')"> 
    </label></td>-->
  </tr>

  <tr class="td2" id="line1"  >
    <td>小屏第一行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3"><input type="text" name="hytzLine1"  class="area100" maxlength="30" check="c_y_200" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("SMALLSCREEN_LINE_ONE")+"") %>" >	</td>
  </tr>
  <tr class="td2" id="line2"  >
    <td>小屏第二行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3"><input type="text" name="hytzLine2"  class="area100" maxlength="30"  check="c_y_200" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("SMALLSCREEN_LINE_TWO")+"") %>" >	</td>
  </tr>
  <tr class="td2" id="line3"  >
    <td>小屏第三行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3"><input type="text" name="hytzLine3"  class="area100" maxlength="30"  check="c_y_200" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("SMALLSCREEN_LINE_THREE")+"") %>" >	</td>
  </tr>
  <tr class="td2" id="line4"  >
    <td>小屏第四行显示<span class="STYLE2"><br>（汉字15以内，英文30以内）</span></td>
    <td colspan="3"><input type="text" name="hytzLine4"  class="area100" maxlength="30"  check="c_y_200" style="width:96%" value="<%=StringUtil.NULL2Blank(map.get("SMALLSCREEN_LINE_FOUR")+"") %>" >	</td>
  </tr> 
  <tr class="td2">
    <td   >会议起始时间</td>
    <td><input type="text" name="hytzKssj" class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.dateTimeSubStr(map.get("MEETING_BEGIN_TIME")+"") %>"  onClick="changediv(this);changeshow2Sj(this);" readonly></td>
    <td  >会议结束时间</td>
     
    <td><input type="text" name="hytzJssj" class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.dateTimeSubStr(map.get("MEETING_END_TIME")+"") %>"    onClick="changediv(this);changeshow2Sj(this);" readonly></td>
  </tr>
  <tr class="td2">
    <td>发布者</td>
    <td> <%=userStr%></td>
    <td>发布时间</td>
    <td><!-- <input type="text" name="hytzFbsj"  class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.dateTimeSubStr(map.get("MEETING_PUBLISH_TIME")+"") %>"  onClick="changediv(this);changeshow2Sj(this);" readonly>-->
    <input type="text" name="hytzFbsj"  class="area100" check="c_n_200" style="width:90%" value="<%=StringUtil.currentTime()%>"   readonly></td>
  </tr>

  <tr class="td2" id="preview" style="display:" >
    <td colspan="4"><input type="button" name="dook" value="预览" onClick="javascript:gotopage()" class="area100"  ></td>
  </tr>
		  <tr class="top_td" >
			<td  colspan="4">			</td>
		  </tr>
     </table>
  </center>
</form> 

</body>
</html>
<%@ include file="/hotel/pow.jsp"%>
